﻿using FluentMigrator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ETA.DbMigrations.V20140524
{
    [Migration(2014071913)]
    public class _07_UploadFileInit : AutoReversingMigration
    {
        public override void Up()
        {
            var now = DateTime.Now;
            Insert.IntoTable("UploadFile")
           .Row(new { UploadFileId = "1fce80e5-ac49-4406-9b98-c498ecf2e589", FileName = "JP-2014-0001.doc", FileTypeId = "89bf83ad-0acf-49c9-8364-93a0e771f545", CreateDate = now, ModifyDate = now, IsDelete = 0 })
           .Row(new { UploadFileId = "436c1168-4ec9-4662-b23a-201c0f83396e", FileName = "JP-2014-0002.doc", FileTypeId = "89bf83ad-0acf-49c9-8364-93a0e771f545", CreateDate = now, ModifyDate = now, IsDelete = 0 })
           .Row(new { UploadFileId = "56fab9f0-4432-43ff-9a66-b7a22c36fc58", FileName = "JP-2014-0003.doc", FileTypeId = "89bf83ad-0acf-49c9-8364-93a0e771f545", CreateDate = now, ModifyDate = now, IsDelete = 0 })
                //日本机构资料END
            .Row(new { UploadFileId = "32f65f2c-5e71-4d3b-872f-6d477010567b", FileName = "CH-2014-0001.doc", FileTypeId = "114db2ca-6b58-4959-9790-6794ef81f469", CreateDate = now, ModifyDate = now, IsDelete = 0 })
           .Row(new { UploadFileId = "7512237b-e0fd-464d-897b-9dd4cd80dba3", FileName = "CH-2014-0002.doc", FileTypeId = "114db2ca-6b58-4959-9790-6794ef81f469", CreateDate = now, ModifyDate = now, IsDelete = 0 })
           .Row(new { UploadFileId = "96c09b8c-58bd-49eb-91ce-b6dbca8a2b50", FileName = "CH-2014-0003.doc", FileTypeId = "114db2ca-6b58-4959-9790-6794ef81f469", CreateDate = now, ModifyDate = now, IsDelete = 0 });
            //国内机构资料END

            Insert.IntoTable("Document")
            .Row(new
            {
                DocumentId = Guid.NewGuid().ToString(),
                Title = "《出国网络直通车平台介绍》",
                DocNo = "JP-2014-0001",
                Target = "日本受入机构",
                Version = "2014-05-17",
                ContentRefrence = "出国直通车平台",
                UploadFileId = "1fce80e5-ac49-4406-9b98-c498ecf2e589",
                CreateDate = now,
                ModifyDate = now,
                IsDelete = 0
            }).Row(new
            {
                DocumentId = Guid.NewGuid().ToString(),
                Title = "《出国网络直通车平台介绍》",
                DocNo = "JP-2014-0002",
                Target = "日本受入机构",
                Version = "2014-05-17",
                ContentRefrence = "出国直通车平台",
                UploadFileId = "436c1168-4ec9-4662-b23a-201c0f83396e",
                CreateDate = now,
                ModifyDate = now,
                IsDelete = 0
            }).Row(new
            {
                DocumentId = Guid.NewGuid().ToString(),
                Title = "《出国网络直通车平台介绍》",
                DocNo = "JP-2014-0003",
                Target = "日本受入机构",
                Version = "2014-05-17",
                ContentRefrence = "出国直通车平台",
                UploadFileId = "56fab9f0-4432-43ff-9a66-b7a22c36fc58",
                CreateDate = now,
                ModifyDate = now,
                IsDelete = 0
            }).Row(new
            {
                DocumentId = Guid.NewGuid().ToString(),
                Title = "《赴日技能实习生培训考题》",
                DocNo = "CH-2014-0001",
                Target = "赴日技能实习生",
                Version = "2014-05-17",
                ContentRefrence = "出国直通车平台",
                UploadFileId = "32f65f2c-5e71-4d3b-872f-6d477010567b",
                CreateDate = now,
                ModifyDate = now,
                IsDelete = 0
            }).Row(new
            {
                DocumentId = Guid.NewGuid().ToString(),
                Title = "《赴日技能实习生培训大纲》",
                DocNo = "CH-2014-0002",
                Target = "赴日技能实习生",
                Version = "2014-05-17",
                ContentRefrence = "出国直通车平台",
                UploadFileId = "7512237b-e0fd-464d-897b-9dd4cd80dba3",
                CreateDate = now,
                ModifyDate = now,
                IsDelete = 0
            }).Row(new
            {
                DocumentId = Guid.NewGuid().ToString(),
                Title = "《国内派遣机构业务指导》",
                DocNo = "CH-2014-0003",
                Target = "国内派遣机构",
                Version = "2014-05-17",
                ContentRefrence = "出国直通车平台",
                UploadFileId = "96c09b8c-58bd-49eb-91ce-b6dbca8a2b50",
                CreateDate = now,
                ModifyDate = now,
                IsDelete = 0
            });


        }
    }
}
